<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
	<title>Docs For Class Cache_Lite</title>
	<link rel="stylesheet" type="text/css" id="layout" href="../media/layout.css" media="screen">
	<link rel="stylesheet" type="text/css" href="../media/style.css" media="all">
	<link rel="stylesheet" type="text/css" href="../media/print.css" media="print">
</head>

<body>
<div id="header">
	<div id="navLinks">
        
                                                        
                                                	        [ <a href="../classtrees_Cache_Lite.html">Class Tree: Cache_Lite</a> ]
            [ <a href="../elementindex_Cache_Lite.html">Index: Cache_Lite</a> ]
        		[ <a href="../elementindex.html">All elements</a> ]		
	</div>
	<div id="packagePosition">
		<div id="packageTitle2">Cache_Lite</div>
		<div id="packageTitle">Cache_Lite</div>
		<div id="elementPath"> &middot; </div>
	</div>
</div>

<div id="nav" class="small">
	<div id="packages">
		Packages:
					<p><a href="../li_default.html">default</a></p>
					<p><a href="../li_Cache_Lite.html">Cache_Lite</a></p>
					<p><a href="../li_Evalactipol_libraries.html">Evalactipol_libraries</a></p>
			</div>

				<div id="index">
			<div id="files">
								Files:<br>
								<a href="../Cache_Lite/_CacheLite---Lite---File.php.html">		File.php
		</a><br>
			<a href="../Cache_Lite/_CacheLite---Lite---Function.php.html">		Function.php
		</a><br>
			<a href="../Cache_Lite/_CacheLite---Lite.php.html">		Lite.php
		</a><br>
			<a href="../Cache_Lite/_CacheLite---Lite---Output.php.html">		Output.php
		</a><br>
				</div>
			<div id="interfaces">
							</div>
			<div id="classes">
				Classes:<br>
								<a href="../Cache_Lite/Cache_Lite.html">		Cache_Lite
		</a><br>
			<a href="../Cache_Lite/Cache_Lite_File.html">		Cache_Lite_File
		</a><br>
			<a href="../Cache_Lite/Cache_Lite_Function.html">		Cache_Lite_Function
		</a><br>
			<a href="../Cache_Lite/Cache_Lite_Output.html">		Cache_Lite_Output
		</a><br>
				</div>
		</div>
	</div>

<div id="body">
	    		<h1>Class: Cache_Lite</h1>
	<p style="margin: 0px;">Source Location: /CacheLite/Lite.php</p>
	

<div class="leftcol">
	<h3><a href="#class_details">Class Overview</a> <span class="smalllinenumber">[line 29]</span></h3>
	<div id="classTree"><pre></pre>
</div>
	<div class="small">
	<p></p>
		<h4>Author(s):</h4>
	<ul>
			</ul>
	<h4>Version:</h4>
	<ul>
			</ul>

	<h4>Copyright:</h4>
	<ul>
			</li>
	</div>
</div>

<div class="middlecol">
	<h3><a href="#class_vars">Variables</a></h3>
	<ul class="small">
				<li><a href="../Cache_Lite/Cache_Lite.html#var$_automaticCleaningFactor">$_automaticCleaningFactor</a></li>
				<li><a href="../Cache_Lite/Cache_Lite.html#var$_automaticSerialization">$_automaticSerialization</a></li>
				<li><a href="../Cache_Lite/Cache_Lite.html#var$_cacheDir">$_cacheDir</a></li>
				<li><a href="../Cache_Lite/Cache_Lite.html#var$_caching">$_caching</a></li>
				<li><a href="../Cache_Lite/Cache_Lite.html#var$_errorHandlingAPIBreak">$_errorHandlingAPIBreak</a></li>
				<li><a href="../Cache_Lite/Cache_Lite.html#var$_file">$_file</a></li>
				<li><a href="../Cache_Lite/Cache_Lite.html#var$_fileLocking">$_fileLocking</a></li>
				<li><a href="../Cache_Lite/Cache_Lite.html#var$_fileName">$_fileName</a></li>
				<li><a href="../Cache_Lite/Cache_Lite.html#var$_fileNameProtection">$_fileNameProtection</a></li>
				<li><a href="../Cache_Lite/Cache_Lite.html#var$_group">$_group</a></li>
				<li><a href="../Cache_Lite/Cache_Lite.html#var$_hashedDirectoryLevel">$_hashedDirectoryLevel</a></li>
				<li><a href="../Cache_Lite/Cache_Lite.html#var$_hashedDirectoryUmask">$_hashedDirectoryUmask</a></li>
				<li><a href="../Cache_Lite/Cache_Lite.html#var$_id">$_id</a></li>
				<li><a href="../Cache_Lite/Cache_Lite.html#var$_lifeTime">$_lifeTime</a></li>
				<li><a href="../Cache_Lite/Cache_Lite.html#var$_memoryCaching">$_memoryCaching</a></li>
				<li><a href="../Cache_Lite/Cache_Lite.html#var$_memoryCachingArray">$_memoryCachingArray</a></li>
				<li><a href="../Cache_Lite/Cache_Lite.html#var$_memoryCachingCounter">$_memoryCachingCounter</a></li>
				<li><a href="../Cache_Lite/Cache_Lite.html#var$_memoryCachingLimit">$_memoryCachingLimit</a></li>
				<li><a href="../Cache_Lite/Cache_Lite.html#var$_onlyMemoryCaching">$_onlyMemoryCaching</a></li>
				<li><a href="../Cache_Lite/Cache_Lite.html#var$_pearErrorMode">$_pearErrorMode</a></li>
				<li><a href="../Cache_Lite/Cache_Lite.html#var$_readControl">$_readControl</a></li>
				<li><a href="../Cache_Lite/Cache_Lite.html#var$_readControlType">$_readControlType</a></li>
				<li><a href="../Cache_Lite/Cache_Lite.html#var$_refreshTime">$_refreshTime</a></li>
				<li><a href="../Cache_Lite/Cache_Lite.html#var$_writeControl">$_writeControl</a></li>
			</ul>
	<h3><a href="#class_consts">Constants</a></h3>
	<ul class="small">
			</ul>
</div>
<div class="rightcol">
	<h3><a href="#class_methods">Methods</a></h3>
	<ul class="small">
				<li><a href="../Cache_Lite/Cache_Lite.html#methodCache_Lite">Cache_Lite</a></li>
				<li><a href="../Cache_Lite/Cache_Lite.html#methodclean">clean</a></li>
				<li><a href="../Cache_Lite/Cache_Lite.html#methodextendLife">extendLife</a></li>
				<li><a href="../Cache_Lite/Cache_Lite.html#methodget">get</a></li>
				<li><a href="../Cache_Lite/Cache_Lite.html#methodgetMemoryCachingState">getMemoryCachingState</a></li>
				<li><a href="../Cache_Lite/Cache_Lite.html#methodlastModified">lastModified</a></li>
				<li><a href="../Cache_Lite/Cache_Lite.html#methodraiseError">raiseError</a></li>
				<li><a href="../Cache_Lite/Cache_Lite.html#methodremove">remove</a></li>
				<li><a href="../Cache_Lite/Cache_Lite.html#methodsave">save</a></li>
				<li><a href="../Cache_Lite/Cache_Lite.html#methodsaveMemoryCachingState">saveMemoryCachingState</a></li>
				<li><a href="../Cache_Lite/Cache_Lite.html#methodsetLifeTime">setLifeTime</a></li>
				<li><a href="../Cache_Lite/Cache_Lite.html#methodsetOption">setOption</a></li>
				<li><a href="../Cache_Lite/Cache_Lite.html#methodsetToDebug">setToDebug</a></li>
			</ul>
</div>

<div id="content">
<hr>
	<div class="contents">
	<h2>Child classes:</h2>
		<dl>
	<dt><a href="../Cache_Lite/Cache_Lite_File.html">Cache_Lite_File</a></dt>
		<dd></dd>
	</dl>
		<dl>
	<dt><a href="../Cache_Lite/Cache_Lite_Function.html">Cache_Lite_Function</a></dt>
		<dd>This class extends Cache_Lite and can be used to cache the result and output of functions/methods</dd>
	</dl>
		<dl>
	<dt><a href="../Cache_Lite/Cache_Lite_Output.html">Cache_Lite_Output</a></dt>
		<dd></dd>
	</dl>
	</p>
	</div>

	<div class="leftCol">
    	<h2>Inherited Variables</h2>
		<h2>Inherited Constants</h2>
		</div>

	<div class="rightCol">
	<h2>Inherited Methods</h2>
		</div>
	<br clear="all">
	<hr>

	<a name="class_details"></a>
	<h2>Class Details</h2>
		<p class="small" style="color: #334B66;">[ <a href="#top">Top</a> ]</p>

	<hr>
	<a name="class_vars"></a>
	<h2>Class Variables</h2>
		<a name="var$_automaticCleaningFactor"></a>
	<p></p>
	<h4>$_automaticCleaningFactor = <span class="value">&nbsp;0</span></h4>
	<div class="indent">
		<p class="linenumber">[line 217]</p>
		<p align="center"><strong>Disable / Tune the automatic cleaning process
</strong></p>
<p>The automatic cleaning process destroy too old (for the given life time)  cache files when a new cache file is written. <ol><li>=&gt; no automatic cache cleaning</li><li>=&gt; systematic cache cleaning</li></ol> x (integer) &gt; 1 =&gt; automatic cleaning randomly 1 times on x cache write</p>		<p><b>Type:</b> int</p>
		<p><b>Overrides:</b> </p>
	</div>
	<p class="top">[ <a href="#top">Top</a> ]</p>
	<a name="var$_automaticSerialization"></a>
	<p></p>
	<h4>$_automaticSerialization = <span class="value">&nbsp;false</span></h4>
	<div class="indent">
		<p class="linenumber">[line 204]</p>
		<p align="center"><strong>Enable / disable automatic serialization
</strong></p>
<p>it can be used to save directly datas which aren't strings  (but it's slower)</p>		<p><b>Type:</b> boolean</p>
		<p><b>Overrides:</b> </p>
	</div>
	<p class="top">[ <a href="#top">Top</a> ]</p>
	<a name="var$_cacheDir"></a>
	<p></p>
	<h4>$_cacheDir = <span class="value">&nbsp;'/tmp/'</span></h4>
	<div class="indent">
		<p class="linenumber">[line 40]</p>
		<p align="center"><strong>Directory where to put the cache files  (make sure to add a trailing slash)
</strong></p>
		<p><b>Type:</b> string</p>
		<p><b>Overrides:</b> </p>
	</div>
	<p class="top">[ <a href="#top">Top</a> ]</p>
	<a name="var$_caching"></a>
	<p></p>
	<h4>$_caching = <span class="value">&nbsp;true</span></h4>
	<div class="indent">
		<p class="linenumber">[line 49]</p>
		<p align="center"><strong>Enable / disable caching
</strong></p>
<p>(can be very usefull for the debug of cached scripts)</p>		<p><b>Type:</b> boolean</p>
		<p><b>Overrides:</b> </p>
	</div>
	<p class="top">[ <a href="#top">Top</a> ]</p>
	<a name="var$_errorHandlingAPIBreak"></a>
	<p></p>
	<h4>$_errorHandlingAPIBreak = <span class="value">&nbsp;false</span></h4>
	<div class="indent">
		<p class="linenumber">[line 249]</p>
		<p align="center"><strong>API break for error handling in CACHE_LITE_ERROR_RETURN mode
</strong></p>
<p>In CACHE_LITE_ERROR_RETURN mode, error handling was not good because  for example save() method always returned a boolean (a PEAR_Error object  would be better in CACHE_LITE_ERROR_RETURN mode). To correct this without  breaking the API, this option (false by default) can change this handling.</p>		<p><b>Type:</b> boolean</p>
		<p><b>Overrides:</b> </p>
	</div>
	<p class="top">[ <a href="#top">Top</a> ]</p>
	<a name="var$_file"></a>
	<p></p>
	<h4>$_file</h4>
	<div class="indent">
		<p class="linenumber">[line 81]</p>
		<p align="center"><strong>File name (with path)
</strong></p>
		<p><b>Type:</b> string</p>
		<p><b>Overrides:</b> </p>
	</div>
	<p class="top">[ <a href="#top">Top</a> ]</p>
	<a name="var$_fileLocking"></a>
	<p></p>
	<h4>$_fileLocking = <span class="value">&nbsp;true</span></h4>
	<div class="indent">
		<p class="linenumber">[line 67]</p>
		<p align="center"><strong>Enable / disable fileLocking
</strong></p>
<p>(can avoid cache corruption under bad circumstances)</p>		<p><b>Type:</b> boolean</p>
		<p><b>Overrides:</b> </p>
	</div>
	<p class="top">[ <a href="#top">Top</a> ]</p>
	<a name="var$_fileName"></a>
	<p></p>
	<h4>$_fileName</h4>
	<div class="indent">
		<p class="linenumber">[line 88]</p>
		<p align="center"><strong>File name (without path)
</strong></p>
		<p><b>Type:</b> string</p>
		<p><b>Overrides:</b> </p>
	</div>
	<p class="top">[ <a href="#top">Top</a> ]</p>
	<a name="var$_fileNameProtection"></a>
	<p></p>
	<h4>$_fileNameProtection = <span class="value">&nbsp;true</span></h4>
	<div class="indent">
		<p class="linenumber">[line 194]</p>
		<p align="center"><strong>File Name protection
</strong></p>
<p>if set to true, you can use any cache id or group name  if set to false, it can be faster but cache ids and group names  will be used directly in cache file names so be carefull with  special characters...</p>		<p><b>Type:</b> boolean</p>
		<p><b>Overrides:</b> </p>
	</div>
	<p class="top">[ <a href="#top">Top</a> ]</p>
	<a name="var$_group"></a>
	<p></p>
	<h4>$_group</h4>
	<div class="indent">
		<p class="linenumber">[line 144]</p>
		<p align="center"><strong>Current cache group
</strong></p>
		<p><b>Type:</b> string</p>
		<p><b>Overrides:</b> </p>
	</div>
	<p class="top">[ <a href="#top">Top</a> ]</p>
	<a name="var$_hashedDirectoryLevel"></a>
	<p></p>
	<h4>$_hashedDirectoryLevel = <span class="value">&nbsp;0</span></h4>
	<div class="indent">
		<p class="linenumber">[line 230]</p>
		<p align="center"><strong>Nested directory level
</strong></p>
<p>Set the hashed directory structure level. 0 means &quot;no hashed directory  structure&quot;, 1 means &quot;one level of directory&quot;, 2 means &quot;two levels&quot;...  This option can speed up Cache_Lite only when you have many thousands of  cache file. Only specific benchs can help you to choose the perfect value  for you. Maybe, 1 or 2 is a good start.</p>		<p><b>Type:</b> int</p>
		<p><b>Overrides:</b> </p>
	</div>
	<p class="top">[ <a href="#top">Top</a> ]</p>
	<a name="var$_hashedDirectoryUmask"></a>
	<p></p>
	<h4>$_hashedDirectoryUmask = <span class="value">&nbsp;0700</span></h4>
	<div class="indent">
		<p class="linenumber">[line 237]</p>
		<p align="center"><strong>Umask for hashed directory structure
</strong></p>
		<p><b>Type:</b> int</p>
		<p><b>Overrides:</b> </p>
	</div>
	<p class="top">[ <a href="#top">Top</a> ]</p>
	<a name="var$_id"></a>
	<p></p>
	<h4>$_id</h4>
	<div class="indent">
		<p class="linenumber">[line 137]</p>
		<p align="center"><strong>Current cache id
</strong></p>
		<p><b>Type:</b> string</p>
		<p><b>Overrides:</b> </p>
	</div>
	<p class="top">[ <a href="#top">Top</a> ]</p>
	<a name="var$_lifeTime"></a>
	<p></p>
	<h4>$_lifeTime = <span class="value">&nbsp;3600</span></h4>
	<div class="indent">
		<p class="linenumber">[line 58]</p>
		<p align="center"><strong>Cache lifetime (in seconds)
</strong></p>
<p>If null, the cache is valid forever.</p>		<p><b>Type:</b> int</p>
		<p><b>Overrides:</b> </p>
	</div>
	<p class="top">[ <a href="#top">Top</a> ]</p>
	<a name="var$_memoryCaching"></a>
	<p></p>
	<h4>$_memoryCaching = <span class="value">&nbsp;false</span></h4>
	<div class="indent">
		<p class="linenumber">[line 153]</p>
		<p align="center"><strong>Enable / Disable &quot;Memory Caching&quot;
</strong></p>
<p>NB : There is no lifetime for memory caching !</p>		<p><b>Type:</b> boolean</p>
		<p><b>Overrides:</b> </p>
	</div>
	<p class="top">[ <a href="#top">Top</a> ]</p>
	<a name="var$_memoryCachingArray"></a>
	<p></p>
	<h4>$_memoryCachingArray = <span class="value">array()</span></h4>
	<div class="indent">
		<p class="linenumber">[line 168]</p>
		<p align="center"><strong>Memory caching array
</strong></p>
		<p><b>Type:</b> array</p>
		<p><b>Overrides:</b> </p>
	</div>
	<p class="top">[ <a href="#top">Top</a> ]</p>
	<a name="var$_memoryCachingCounter"></a>
	<p></p>
	<h4>$_memoryCachingCounter = <span class="value">&nbsp;0</span></h4>
	<div class="indent">
		<p class="linenumber">[line 175]</p>
		<p align="center"><strong>Memory caching counter
</strong></p>
		<p><b>Type:</b> int</p>
		<p><b>Overrides:</b> </p>
	</div>
	<p class="top">[ <a href="#top">Top</a> ]</p>
	<a name="var$_memoryCachingLimit"></a>
	<p></p>
	<h4>$_memoryCachingLimit = <span class="value">&nbsp;1000</span></h4>
	<div class="indent">
		<p class="linenumber">[line 182]</p>
		<p align="center"><strong>Memory caching limit
</strong></p>
		<p><b>Type:</b> int</p>
		<p><b>Overrides:</b> </p>
	</div>
	<p class="top">[ <a href="#top">Top</a> ]</p>
	<a name="var$_onlyMemoryCaching"></a>
	<p></p>
	<h4>$_onlyMemoryCaching = <span class="value">&nbsp;false</span></h4>
	<div class="indent">
		<p class="linenumber">[line 161]</p>
		<p align="center"><strong>Enable / Disable &quot;Only Memory Caching&quot;  (be carefull, memory caching is &quot;beta quality&quot;)
</strong></p>
		<p><b>Type:</b> boolean</p>
		<p><b>Overrides:</b> </p>
	</div>
	<p class="top">[ <a href="#top">Top</a> ]</p>
	<a name="var$_pearErrorMode"></a>
	<p></p>
	<h4>$_pearErrorMode = <span class="value">&nbsp;CACHE_LITE_ERROR_RETURN</span></h4>
	<div class="indent">
		<p class="linenumber">[line 130]</p>
		<p align="center"><strong>Pear error mode (when raiseError is called)
</strong></p>
<p>(see PEAR doc)</p><h4>Tags:</h4>
<ul>
	<li><b>see</b> - <a href="../Cache_Lite/Cache_Lite.html#methodsetToDebug">Cache_Lite::setToDebug()</a></li>
</ul>
		<p><b>Type:</b> int</p>
		<p><b>Overrides:</b> </p>
	</div>
	<p class="top">[ <a href="#top">Top</a> ]</p>
	<a name="var$_readControl"></a>
	<p></p>
	<h4>$_readControl = <span class="value">&nbsp;true</span></h4>
	<div class="indent">
		<p class="linenumber">[line 108]</p>
		<p align="center"><strong>Enable / disable read control
</strong></p>
<p>If enabled, a control key is embeded in cache file and this key is compared with the one  calculated after the reading.</p>		<p><b>Type:</b> boolean</p>
		<p><b>Overrides:</b> </p>
	</div>
	<p class="top">[ <a href="#top">Top</a> ]</p>
	<a name="var$_readControlType"></a>
	<p></p>
	<h4>$_readControlType = <span class="value">&nbsp;'crc32'</span></h4>
	<div class="indent">
		<p class="linenumber">[line 120]</p>
		<p align="center"><strong>Type of read control (only if read control is enabled)
</strong></p>
<p>Available values are :  'md5' for a md5 hash control (best but slowest)  'crc32' for a crc32 hash control (lightly less safe but faster, better choice)  'strlen' for a length only test (fastest)</p>		<p><b>Type:</b> boolean</p>
		<p><b>Overrides:</b> </p>
	</div>
	<p class="top">[ <a href="#top">Top</a> ]</p>
	<a name="var$_refreshTime"></a>
	<p></p>
	<h4>$_refreshTime</h4>
	<div class="indent">
		<p class="linenumber">[line 74]</p>
		<p align="center"><strong>Timestamp of the last valid cache
</strong></p>
		<p><b>Type:</b> int</p>
		<p><b>Overrides:</b> </p>
	</div>
	<p class="top">[ <a href="#top">Top</a> ]</p>
	<a name="var$_writeControl"></a>
	<p></p>
	<h4>$_writeControl = <span class="value">&nbsp;true</span></h4>
	<div class="indent">
		<p class="linenumber">[line 98]</p>
		<p align="center"><strong>Enable / disable write control (the cache is read just after writing to detect corrupt entries)
</strong></p>
<p>Enable write control will lightly slow the cache writing but not the cache reading  Write control can detect some corrupt cache files but maybe it's not a perfect control</p>		<p><b>Type:</b> boolean</p>
		<p><b>Overrides:</b> </p>
	</div>
	<p class="top">[ <a href="#top">Top</a> ]</p>

	<hr>
	<a name="class_methods"></a>
	<h2>Class Methods</h2>
	
	<a name="methodCache_Lite"></a>
	<p></p>
	<h3>Cache_Lite</h3>
	<div class="indent">
		<p>
		<code>Cache_Lite Cache_Lite(
[array
$options = array(NULL)])</code>
		</p>
	
		<p class="linenumber">[line 280]</p>
		<p align="center"><strong>Constructor
</strong></p>
<p>$options is an assoc. Available options are :  $options = array(      'cacheDir' =&gt; directory where to put the cache files (string),      'caching' =&gt; enable / disable caching (boolean),      'lifeTime' =&gt; cache lifetime in seconds (int),      'fileLocking' =&gt; enable / disable fileLocking (boolean),      'writeControl' =&gt; enable / disable write control (boolean),      'readControl' =&gt; enable / disable read control (boolean),      'readControlType' =&gt; type of read control 'crc32', 'md5', 'strlen' (string),      'pearErrorMode' =&gt; pear error mode (when raiseError is called) (cf PEAR doc) (int),      'memoryCaching' =&gt; enable / disable memory caching (boolean),      'onlyMemoryCaching' =&gt; enable / disable only memory caching (boolean),      'memoryCachingLimit' =&gt; max nbr of records to store into memory caching (int),      'fileNameProtection' =&gt; enable / disable automatic file name protection (boolean),      'automaticSerialization' =&gt; enable / disable automatic serialization (boolean),      'automaticCleaningFactor' =&gt; distable / tune automatic cleaning process (int),      'hashedDirectoryLevel' =&gt; level of the hashed directory system (int),      'hashedDirectoryUmask' =&gt; umask for hashed directory structure (int),      'errorHandlingAPIBreak' =&gt; API break for better error handling ? (boolean)  );</p><h4>Tags:</h4>
<ul>
	<li><b>access</b> - public</li>
</ul>
		
	
	<h4>Parameters:</h4>
	<ul>
			<li>
		<span class="type">array</span>
		<b>$options</b> 
		- 
		options</li>
		</ul>
	</div>
	<p class="top">[ <a href="#top">Top</a> ]</p>
	<a name="methodclean"></a>
	<p></p>
	<h3>clean</h3>
	<div class="indent">
		<p>
		<code>boolean clean(
[string
$group = false], [string
$mode = 'ingroup'])</code>
		</p>
	
		<p class="linenumber">[line 443]</p>
		<p align="center"><strong>Clean the cache
</strong></p>
<p>if no group is specified all cache files will be destroyed  else only cache files of the specified group will be destroyed</p><h4>Tags:</h4>
<ul>
	<li><b>return</b> - true if no problem</li>
	<li><b>access</b> - public</li>
</ul>
		
	
	<h4>Parameters:</h4>
	<ul>
			<li>
		<span class="type">string</span>
		<b>$group</b> 
		- 
		name of the cache group</li>
			<li>
		<span class="type">string</span>
		<b>$mode</b> 
		- 
		flush cache mode : 'old', 'ingroup', 'notingroup',                                         'callback_myFunction'</li>
		</ul>
	</div>
	<p class="top">[ <a href="#top">Top</a> ]</p>
	<a name="methodextendLife"></a>
	<p></p>
	<h3>extendLife</h3>
	<div class="indent">
		<p>
		<code>void extendLife(
)</code>
		</p>
	
		<p class="linenumber">[line 548]</p>
		<p align="center"><strong>Extend the life of a valid cache file
</strong></p>
<p>see http://pear.php.net/bugs/bug.php?id=6681</p><h4>Tags:</h4>
<ul>
	<li><b>access</b> - public</li>
</ul>
		
	
	<h4>Parameters:</h4>
	<ul>
		</ul>
	</div>
	<p class="top">[ <a href="#top">Top</a> ]</p>
	<a name="methodget"></a>
	<p></p>
	<h3>get</h3>
	<div class="indent">
		<p>
		<code>string get(
string
$id, [string
$group = 'default'], [boolean
$doNotTestCacheValidity = false])</code>
		</p>
	
		<p class="linenumber">[line 314]</p>
		<p align="center"><strong>Test if a cache is available and (if yes) return it
</strong></p>
<h4>Tags:</h4>
<ul>
	<li><b>return</b> - data of the cache (else : false)</li>
	<li><b>access</b> - public</li>
</ul>
		
	<p>Overridden in child classes as:<br />
		<dl>
	<dt><a href="../Cache_Lite/Cache_Lite_File.html#methodget">Cache_Lite_File::get()</a></dt>
		<dd>Test if a cache is available and (if yes) return it</dd>
	</dl>
	</p>
	
	<h4>Parameters:</h4>
	<ul>
			<li>
		<span class="type">string</span>
		<b>$id</b> 
		- 
		cache id</li>
			<li>
		<span class="type">string</span>
		<b>$group</b> 
		- 
		name of the cache group</li>
			<li>
		<span class="type">boolean</span>
		<b>$doNotTestCacheValidity</b> 
		- 
		if set to true, the cache validity won't be tested</li>
		</ul>
	</div>
	<p class="top">[ <a href="#top">Top</a> ]</p>
	<a name="methodgetMemoryCachingState"></a>
	<p></p>
	<h3>getMemoryCachingState</h3>
	<div class="indent">
		<p>
		<code>void getMemoryCachingState(
string
$id, [string
$group = 'default'], [boolean
$doNotTestCacheValidity = false])</code>
		</p>
	
		<p class="linenumber">[line 500]</p>
		<p align="center"><strong>Load the state of the caching memory array from a given cache file cache
</strong></p>
<h4>Tags:</h4>
<ul>
	<li><b>access</b> - public</li>
</ul>
		
	
	<h4>Parameters:</h4>
	<ul>
			<li>
		<span class="type">string</span>
		<b>$id</b> 
		- 
		cache id</li>
			<li>
		<span class="type">string</span>
		<b>$group</b> 
		- 
		name of the cache group</li>
			<li>
		<span class="type">boolean</span>
		<b>$doNotTestCacheValidity</b> 
		- 
		if set to true, the cache validity won't be tested</li>
		</ul>
	</div>
	<p class="top">[ <a href="#top">Top</a> ]</p>
	<a name="methodlastModified"></a>
	<p></p>
	<h3>lastModified</h3>
	<div class="indent">
		<p>
		<code>int lastModified(
)</code>
		</p>
	
		<p class="linenumber">[line 518]</p>
		<p align="center"><strong>Return the cache last modification time
</strong></p>
<p>BE CAREFUL : THIS METHOD IS FOR HACKING ONLY !</p><h4>Tags:</h4>
<ul>
	<li><b>return</b> - last modification time</li>
</ul>
		
	
	<h4>Parameters:</h4>
	<ul>
		</ul>
	</div>
	<p class="top">[ <a href="#top">Top</a> ]</p>
	<a name="methodraiseError"></a>
	<p></p>
	<h3>raiseError</h3>
	<div class="indent">
		<p>
		<code>void raiseError(
string
$msg, int
$code)</code>
		</p>
	
		<p class="linenumber">[line 534]</p>
		<p align="center"><strong>Trigger a PEAR error
</strong></p>
<p>To improve performances, the PEAR.php file is included dynamically.  The file is so included only when an error is triggered. So, in most  cases, the file isn't included and perfs are much better.</p><h4>Tags:</h4>
<ul>
	<li><b>access</b> - public</li>
</ul>
		
	
	<h4>Parameters:</h4>
	<ul>
			<li>
		<span class="type">string</span>
		<b>$msg</b> 
		- 
		error message</li>
			<li>
		<span class="type">int</span>
		<b>$code</b> 
		- 
		error code</li>
		</ul>
	</div>
	<p class="top">[ <a href="#top">Top</a> ]</p>
	<a name="methodremove"></a>
	<p></p>
	<h3>remove</h3>
	<div class="indent">
		<p>
		<code>boolean remove(
string
$id, [string
$group = 'default'])</code>
		</p>
	
		<p class="linenumber">[line 416]</p>
		<p align="center"><strong>Remove a cache file
</strong></p>
<h4>Tags:</h4>
<ul>
	<li><b>return</b> - true if no problem</li>
	<li><b>access</b> - public</li>
</ul>
		
	
	<h4>Parameters:</h4>
	<ul>
			<li>
		<span class="type">string</span>
		<b>$id</b> 
		- 
		cache id</li>
			<li>
		<span class="type">string</span>
		<b>$group</b> 
		- 
		name of the cache group</li>
		</ul>
	</div>
	<p class="top">[ <a href="#top">Top</a> ]</p>
	<a name="methodsave"></a>
	<p></p>
	<h3>save</h3>
	<div class="indent">
		<p>
		<code>boolean save(
string
$data, [string
$id = NULL], [string
$group = 'default'])</code>
		</p>
	
		<p class="linenumber">[line 363]</p>
		<p align="center"><strong>Save some data in a cache file
</strong></p>
<h4>Tags:</h4>
<ul>
	<li><b>return</b> - true if no problem (else : false or a PEAR_Error object)</li>
	<li><b>access</b> - public</li>
</ul>
		
	
	<h4>Parameters:</h4>
	<ul>
			<li>
		<span class="type">string</span>
		<b>$data</b> 
		- 
		data to put in cache (can be another type than strings if automaticSerialization is on)</li>
			<li>
		<span class="type">string</span>
		<b>$id</b> 
		- 
		cache id</li>
			<li>
		<span class="type">string</span>
		<b>$group</b> 
		- 
		name of the cache group</li>
		</ul>
	</div>
	<p class="top">[ <a href="#top">Top</a> ]</p>
	<a name="methodsaveMemoryCachingState"></a>
	<p></p>
	<h3>saveMemoryCachingState</h3>
	<div class="indent">
		<p>
		<code>void saveMemoryCachingState(
string
$id, [string
$group = 'default'])</code>
		</p>
	
		<p class="linenumber">[line 480]</p>
		<p align="center"><strong>Save the state of the caching memory array into a cache file cache
</strong></p>
<h4>Tags:</h4>
<ul>
	<li><b>access</b> - public</li>
</ul>
		
	
	<h4>Parameters:</h4>
	<ul>
			<li>
		<span class="type">string</span>
		<b>$id</b> 
		- 
		cache id</li>
			<li>
		<span class="type">string</span>
		<b>$group</b> 
		- 
		name of the cache group</li>
		</ul>
	</div>
	<p class="top">[ <a href="#top">Top</a> ]</p>
	<a name="methodsetLifeTime"></a>
	<p></p>
	<h3>setLifeTime</h3>
	<div class="indent">
		<p>
		<code>void setLifeTime(
int
$newLifeTime)</code>
		</p>
	
		<p class="linenumber">[line 467]</p>
		<p align="center"><strong>Set a new life time
</strong></p>
<h4>Tags:</h4>
<ul>
	<li><b>access</b> - public</li>
</ul>
		
	
	<h4>Parameters:</h4>
	<ul>
			<li>
		<span class="type">int</span>
		<b>$newLifeTime</b> 
		- 
		new life time (in seconds)</li>
		</ul>
	</div>
	<p class="top">[ <a href="#top">Top</a> ]</p>
	<a name="methodsetOption"></a>
	<p></p>
	<h3>setOption</h3>
	<div class="indent">
		<p>
		<code>void setOption(

$name, 
$value)</code>
		</p>
	
		<p class="linenumber">[line 296]</p>
		<p align="center"><strong>Generic way to set a Cache_Lite option
</strong></p>
<p>see Cache_Lite constructor for available options</p><h4>Tags:</h4>
<ul>
	<li><b>var</b> - name of the option</li>
	<li><b>access</b> - public</li>
</ul>
		
	
	<h4>Parameters:</h4>
	<ul>
			<li>
		<span class="type"></span>
		<b>$name</b> 
		- 
		</li>
			<li>
		<span class="type"></span>
		<b>$value</b> 
		- 
		</li>
		</ul>
	</div>
	<p class="top">[ <a href="#top">Top</a> ]</p>
	<a name="methodsetToDebug"></a>
	<p></p>
	<h3>setToDebug</h3>
	<div class="indent">
		<p>
		<code>void setToDebug(
)</code>
		</p>
	
		<p class="linenumber">[line 456]</p>
		<p align="center"><strong>Set to debug mode
</strong></p>
<p>When an error is found, the script will stop and the message will be displayed  (in debug mode only).</p><h4>Tags:</h4>
<ul>
	<li><b>access</b> - public</li>
</ul>
		
	
	<h4>Parameters:</h4>
	<ul>
		</ul>
	</div>
	<p class="top">[ <a href="#top">Top</a> ]</p>

	<hr>
	<a name="class_consts"></a>
	<h2>Class Constants</h2>
	</div>
	<div id="credit">
		<hr>
		Documentation generated on Tue, 02 Jun 2009 18:23:09 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
	</div>
</div>
</body>
</html>